/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.inspur.edp.lcm.metadata.api.service;

import com.inspur.edp.lcm.metadata.api.entity.GspMetadata;
import com.inspur.edp.lcm.metadata.api.entity.uri.MetadataURI;

/**
 * 获取依赖元数据
 *
 * @author zhaoleitr
 */
public interface RefCommonService {
    /**
     * 获取依赖的元数据
     *
     * @param metadataID 元数据id
     * @return 元数据内容实体
     */
    @Deprecated
    GspMetadata getRefMetadata(String metadataID);

    /**
     * 获取依赖的元数据
     *
     * @param targetURI   目标元数据的uri
     * @param sourceURI   引用目标元数据的元数据uri
     * @param projectPath 工程路径（如果为null，则使用上下文中的projectPath。如果可以获得工程路径，请传过来）
     * @return
     */
    GspMetadata getRefMetadata(MetadataURI targetURI, MetadataURI sourceURI, String projectPath);
}
